package br.com.cogerh.sidec.view;

import java.util.List;

import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.Transaction;

import br.com.cogerh.sidec.model.LogEmail;
import br.com.cogerh.sidec.util.HibernateUtil;

public class LogEmailRN {
	
	public void salvar(LogEmail logEmail){
		Session sessao = HibernateUtil.getSessionFactory().getCurrentSession();
		Transaction tx = sessao.beginTransaction();
		try {
			sessao.save(logEmail);
			sessao.flush();
			sessao.close();
			tx.commit();
		} catch (HibernateException e) {
			tx.rollback();
		}
	}
	public List<LogEmail> listar(){
		return null;
	}
	

}
